projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3c8a57
)
imx: wdog: correct wcr register settings
author
Peng Fan
<
[email protected]
>
Mon, 14 Sep 2015 05:34:44 +0000
(13:34 +0800)
committer
Stefano Babic
<
[email protected]
>
Sun, 20 Sep 2015 07:39:35 +0000
(09:39 +0200)
We should not simple use "writew(WCR_WDE, &wdog->wcr)" to set
wcr, since this will override bits set before reset_cpu.
Use clrsetbits_le16 instead of writew to fix this issue.
Signed-off-by: Peng Fan <
[email protected]
>
Cc: Stefano Babic <
[email protected]
>
Cc: Fabio Estevam <
[email protected]
>
Cc: Sebastian Siewior <
[email protected]
>
Tested-by: Fabio Estevam <
[email protected]
>
drivers/watchdog/imx_watchdog.c
patch
|
blob
|
history
diff --git
a/drivers/watchdog/imx_watchdog.c
b/drivers/watchdog/imx_watchdog.c
index 1d18d4b269f8af94e4f8cae77bdc9a39b5524f8e..9a77a54192be10211da9ebb716f89019290263fc 100644
(file)
--- a/
drivers/watchdog/imx_watchdog.c
+++ b/
drivers/watchdog/imx_watchdog.c
@@
-55,7
+55,8
@@
void reset_cpu(ulong addr)
{
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
- writew(WCR_WDE, &wdog->wcr);
+ clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+
writew(0x5555, &wdog->wsr);
writew(0xaaaa, &wdog->wsr); /* load minimum 1/2 second timeout */
while (1) {